package com.woniuxy.api;

import com.woniu.cloud.common.dto.Result;
import com.woniuxy.form.GetOrder;
import com.woniuxy.form.InsertScoreOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


/**
 * @author :ygj
 * @create 2021-09-21  15:12
 *
 */
@FeignClient(value = "kaer-order",contextId = "ScoreOrderApi")
public interface ScoreOrderApi {

    /**
     * @param getOrder  查询条件
     * @return 返回 Ipage
     * 根据用户Id 分页查询用户积分兑换记录
     *
     */
    @GetMapping("/getScoreOrderByUserId")
    Result getScoreOrderByUserId(@RequestBody GetOrder getOrder);

    /**
     * @param insertScoreOrder  用户根据积分兑换商品生成商品订单
     * @return
     */
    @PostMapping("/insertScoreOrder")
    Result insertScoreOrder(@RequestBody InsertScoreOrder insertScoreOrder);

    /**
     * @param scoreGoodId  积分订单id
     * @param status  修改为的状态
     * @return
     */
    @PostMapping("/updateScoreOrderStatus")
    Result updateScoreOrderStatus(@RequestParam("scoreGoodId") Integer scoreGoodId ,@RequestParam("status") Integer status);




}
